#!/usr/bin/env bash

ctnName=$1

if [ $# != 1 ]; then
    echo -e '
Usage: dc-sh ctnName
'
    exit 1
fi

docker exec $ctnName bash

if [ $? = 0 ]; then
    docker exec -it $ctnName bash
else
    docker exec -it $ctnName sh
fi